﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TSqlServer;

public partial class ajax_companylist : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
        }
        else
        {
            string leftchar = this.Request["lc"].ToString();
            string namelist = "";
            string sSql = "select distinct company from t_linkman where company like '" + leftchar + "%' order by company";
            TSqlDBReader myReader = new TSqlDBReader(sSql);
            while (myReader.FDataReader.Read())
            {
                namelist += myReader.FDataReader.GetValue(0).ToString()+";";
            }
            myReader.Free();

            this.Response.Write(namelist);
            this.Response.End();
        }
    }
}
